package demo4.controller;

import demo4.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class UserController {

    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("UserContrller:接收到用户登录请求");
        System.out.println("UserController:获取用户信息");
        boolean result = userService.doLogin("admin","123456");
        if(result){
            System.out.println("UserController:向用户响应登录成功页面");
        }else {
            System.out.println("UserController:向用户响应登录失败页面");
        }
    }
}
